package www.wen.com.common.lib.helper

import android.view.View
import com.chad.library.adapter.base.BaseQuickAdapter
import com.luck.picture.lib.entity.LocalMedia
import com.lxj.xpopup.core.BasePopupView

/**
 * @author WEN
 * @Description:
 * @date 2021/5/27 14:29
 */



/**
 * 取消回调的高阶函数
 */
typealias CancelFunction = (popupView:BasePopupView) -> Unit

/**
 * 确认回调的高阶函数
 */
typealias ConfirmFunction = (popupView:BasePopupView) -> Unit

/**
 * 底部选项的高阶函数
 */
typealias BottomOptionFunction = (index: Int) -> Unit

/**
 * 相机拍照的回调
 */
typealias OnCameraResultFunction = (localMedias: List<LocalMedia>) -> Unit

/**
 * 相机取消拍照的回调
 */
typealias OnCameraCancelFunction = () -> Unit

/**
 * 初始化时回调之前最后选中机型的下标
 */
typealias OnInitSeriesPositionFunction = (position:Int) -> Unit

/**
 * 回调画板尺寸
 */
typealias OnSizeCallBackFunction = (size:Int) -> Unit

/**
 * 加载完毕后当前Activity可能需要做的事情，例如：跳转某个页面等
 */
typealias OnAfterLoadedDoing = () -> Unit

/**
 * 回调结果的泛型
 */
typealias DismissCallBack = () -> Unit

/**
 * 回调结果的泛型
 */
typealias ResultUiCallBack<T> = (view: View, result:T,popupView:BasePopupView) -> Unit

/**
 * 回调结果的泛型
 */
typealias UiCallBack = (view: View, result:BasePopupView) -> Unit

/**
 * 回调结果的泛型
 */
typealias SelectItemClickCallBack<T> = (result:T, adapter: BaseQuickAdapter<*, *>, position: Int) -> Unit



